import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';

@Entity('exam_user')
export class User {
    @PrimaryGeneratedColumn()
    id: number;

    @Column({
        length: 125,
        name: 'user_name',
        comment: '用户名',
        default: ''
    })
    userName: string;

    @Column({
        length: 11,
        name: 'mobile_no',
        comment: '手机号码',
        default: ''
    })
    mobileNo: string;

    @Column({
        length: 40,
        name: 'password',
        comment: '密码',
        default: ''
    })
    password: string;

    @Column({
        name: 'is_deleted',
        default: false
    })
    isDeleted: boolean;

    @Column({
        width: 20,
        name: 'effect_date',
        comment: '生效日期',
        nullable: true
    })
    effectDate: number;

    @Column({
        width: 20,
        name: 'disabled_date',
        comment: '失效日期',
        nullable: true
    })
    disabledDate: number;

    @Column({
        width: 20,
        name: 'update_date',
        comment: '更新日期',
        nullable: true
    })
    updateDate: number;
}
